#ifndef EVENTTHREAD_H
#define EVENTTHREAD_H
#pragma once
#include "../eventloop.h"
#include "thread.h"
#include "../lock/mutexlock.h"
#include "threadcondition.h"

class EventThread :ProhibitAssignment
{
public:
    EventThread();
    ~EventThread();
    EventLoop* startLoop();

private:
    void threadFunc();
    EventLoop *loop_;
    bool exiting_;
    Thread thread_;
    MutexLock mutex_;
    ThreadCondition cond_;
};
#endif // EVENTTHREAD_H
